/*
学习一个 linktimebuff 通过 useskill 来添加
判重处理机制为：LinktimeBuff+对方id  比交名字是否判重
*/


#ifndef AI9_LOGIC_2017_LINKTIME_H
#define AI9_LOGIC_2017_LINKTIME_H 
#include "sdk/const.h"
#include "skill.h"
#include "entity.h"
#include "base.h"
#include "automatic.h"

namespace skill{
	
    class LinktimeBuff : public Buff
    {
    public:
        std::string _out_target_id;
        LinktimeBuff(std::string _out_id):Buff(LinkBuildTime), _out_target_id(_out_id)
        {
            this->setName("LinktimeBuff"+_out_id);
            this->turn = LinkTurn;
        }
        virtual bool onUnlearn() override{
            origin->useSkill("Link",{origin->id,_out_target_id});
            return true;
        }
    };
}
#endif